package com.jingsheng.jingshengcity.app.utils;

import android.widget.ImageView;

import com.bumptech.glide.Glide;

/**
 * Created by Administrator on 2017/5/6.
 */

public class GlideUtil {

    private GlideUtil() {
    }

    private static final GlideUtil instance = new GlideUtil();


    public static GlideUtil getInstance() {
        return instance;
    }

    public void setBaskground(String url, ImageView imageView, int place) {
        Glide.with(imageView.getContext())
                .load(url)
                .centerCrop()
                .placeholder(place)
                .error(place)
                .crossFade()
                .into(imageView);
    }

    public void setBaskground(String url, ImageView imageView) {
        Glide.with(imageView.getContext())
                .load(url)
                .centerCrop()
                .crossFade()
                .into(imageView);
    }
}
